package com.cjb.cloudsystem.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cjb.cloudsystem.entity.SysObject;
import com.cjb.cloudsystem.vo.FileVO;
import com.cjb.cloudsystem.vo.SysObjectVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
* 对象管理
*
* @author 陈锦斌 2213859123@qq.com
* @since 1.0.0 2023-10-22
*/
public interface SysObjectService extends IService<SysObject>  {
    /**
    * 单体保存
    * @Author chenjinbin
    * @Value
    * @Title
    */
    boolean save(SysObject sysObject);

    /**
    *批量保存
    *
    * @Author chenjinbin
    * @Value
    * @Title
    */
    Integer listSave(List<SysObject> sysObject);
    /**
    * 批量更新
    *
    * @Author chenjinbin
    * @Value
    * @Title
    */
    void listUpdate(List<SysObject> sysObject);
    /**
    * 批量删除
    *
    * @Author chenjinbin
    * @Value
    * @Title
    */
    void listDelete(List<SysObject> sysObject);


    /**
    * 通过id删除
    *
    * @Author chenjinbin
    * @Value
    * @Title
    */
    int deleteById(SysObject sysObject);
    /**
    *单个查询
    *
    * @Author chenjinbin
    * @Value
    * @Title
    */
    SysObject queryById(SysObject sysObject);
    /**
    * 分页查询
    *
    * @Author chenjinbin
    * @Value
    * @Title
    */
    Page queryPage(Page sysObjectPage , SysObjectVO sysObjectVO);

    /**
    * 返回全部信息
    *
    * @Author chenjinbin
    * @Value
    * @Title
    */
    List<SysObject> returnAllData();
    /**
     * readFile
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
     void readFile(String filePath);
    /**
     * upload
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    FileVO upload(MultipartFile file, String dir) throws Exception;
    /**
     * downLoad
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    void downLoad( String filePath);
}
